load("@fbsource//tools/build_defs:rust_library.bzl", "rust_library")

oncall("build_infra")

rust_library(
    name = "buck2_daemon",
    srcs = glob(["src/**/*.rs"]),
    os_deps = [
        (
            "linux",
            [
                "fbsource//third-party/rust:nix",
            ],
        ),
        (
            "macos",
            [
                "fbsource//third-party/rust:nix",
            ],
        ),
    ],
    test_deps = [
        "//buck2/app/buck2_certs:buck2_certs",
        "//common/rust/shed/fbinit:fbinit",
    ],
    deps = [
        "fbsource//third-party/rust:clap",
        "fbsource//third-party/rust:futures",
        "fbsource//third-party/rust:libc",
        "fbsource//third-party/rust:rand",
        "fbsource//third-party/rust:serde_json",
        "fbsource//third-party/rust:tokio",
        "fbsource//third-party/rust:tokio-stream",
        "fbsource//third-party/rust:tracing",
        "//buck2/allocative/allocative:allocative",
        "//buck2/app/buck2_cli_proto:buck2_cli_proto",
        "//buck2/app/buck2_client_ctx:buck2_client_ctx",
        "//buck2/app/buck2_common:buck2_common",
        "//buck2/app/buck2_core:buck2_core",
        "//buck2/app/buck2_data:buck2_data",
        "//buck2/app/buck2_error:buck2_error",
        "//buck2/app/buck2_events:buck2_events",
        "//buck2/app/buck2_fs:buck2_fs",
        "//buck2/app/buck2_resource_control:buck2_resource_control",
        "//buck2/app/buck2_server:buck2_server",
        "//buck2/app/buck2_util:buck2_util",
        "//buck2/dice/dice:dice",
        "//buck2/gazebo/dupe:dupe",
        # @oss-disable[end= ]: "//common/rust/gflags:gflags",
    ],
)
